package com.enjoyor.soa.traffic.server.efoms.dubbo.impl;

import com.alibaba.dubbo.config.annotation.Service;
import com.enjoyor.soa.traffic.api.dto.efoms.EvalItemInfoDto;
import com.enjoyor.soa.traffic.api.service.dubbo.efoms.IDubboEvalItemInfoService;
import com.enjoyor.soa.traffic.server.efoms.dubbo.manage.ManageEvalItemInfoService;
import com.enjoyor.soa.traffic.util.pojo.ResultPojo;
import org.springframework.beans.factory.annotation.Autowired;

@Service(version = "1.0.0", timeout = 4000)
public class DubboEvalItemInfoService implements IDubboEvalItemInfoService {

    @Autowired
    private ManageEvalItemInfoService manageEvalItemInfoService;

    /**
     * 新增评价项
     *
     * @param evalItemInfoDto
     * @param username
     */
    @Override
    public ResultPojo insertEvalItemInfo(EvalItemInfoDto evalItemInfoDto, String username) {
        return manageEvalItemInfoService.insertEvalItemInfo(evalItemInfoDto, username);
    }

    /**
     * 修改评价项
     *
     * @param evalItemInfoDto
     * @param username
     */
    @Override
    public ResultPojo updateEvalItemInfo(EvalItemInfoDto evalItemInfoDto, String username) {
        return manageEvalItemInfoService.updateEvalItemInfo(evalItemInfoDto, username);
    }

    /**
     * 删除评价项
     *
     * @param evalItemId
     * @param username
     */
    @Override
    public ResultPojo deleteEvalItemInfo(String evalItemId, String username) {
        return manageEvalItemInfoService.deleteEvalItemInfo(evalItemId, username);
    }

    /**
     * 查询评价项
     *
     * @param evalItemId
     * @return
     */
    @Override
    public ResultPojo getEvalItemList(String evalItemId) {
        return manageEvalItemInfoService.getEvalItemList(evalItemId);
    }
}
